<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<title>收款明细</title>
<link th:href="@{/ksdH5/css/public/mui/mui.css}" rel="stylesheet"/>
<link th:href="@{/ksdH5/css/public/dizhi.css}" rel="stylesheet" />
<script th:src="@{/ksdH5/js/public/mui/mui.min.js}"></script>
<script th:src="@{/ksdH5/js/public/jquery.min.js}"></script>
<script th:src="@{/ksdH5/js/public/public.js}"></script>
<link th:href="@{/ksdH5/css/quick/quickCont.css}" rel="stylesheet"/>
</head>
<body>
<div class="mui-content">
	<div class="headerBox">
		<a href="javascript:history.go(-1);" class="headerBox_left"><img th:src="@{/ksdH5/img//planList/fanhuiBnt.png}"></a>
		<span>收款明细</span>
	</div>
	<ul class="quickContBox">
	
<!-- 		<li>
			<div class="quickContBox_left">
				<div class="quickContBox_left_top">
					<strong>建设银行</strong>
					<span>尾号:0987</span>
				</div>
				<div class="quickContBox_left_bottom">
					2018-11-22&nbsp;&nbsp;09:28:18
				</div>
			</div>
			<div class="quickContBox_right">
				<strong class="quickContBox_right_failure">1000元</strong>
				<em >失败 < img class="smartContBox_bottom_right_tishi" src="../../img/makePlan_wenhao.png" /></em>
			</div>
		</li>
		<li>
			<div class="quickContBox_left">
				<div class="quickContBox_left_top">
					<strong>建设银行</strong>
					<span>尾号:0987</span>
				</div>
				<div class="quickContBox_left_bottom">
					2018-11-22&nbsp;&nbsp;09:28:18
				</div>
			</div>
			<div class="quickContBox_right">
				<strong class="quickContBox_right_failure">1000元</strong>
				<em>未支付</em>
			</div>
		</li> -->
	</ul>
	<!--暂无数据-->
	<div class="smartContBox_noData" style="display: none;">
		<img th:src="@{/ksdH5/img//kjmx_zwsj.png}" />
		<p>您暂时还没有数据哦</p>
	</div>
</div>
</body>
<script type="text/javascript">
mui.init({
	swipeBack:true
})
</script>
<script type="text/javascript" th:inline="javascript">
//获得项目根路径
var ctx = [[@{/}]];
//取出后台modelMap中的值
var result= [[${result}]];
var obj = [[${obj}]];//快捷明细列表
/*失败提示语句*/
$(document).on('click',".smartContBox_bottom_right_tishi",function(){
 
});
</script>
<script type="text/javascript">
//滚动条到底部加载更多
var count=0;//底部滚动次数
/* $(document).scroll(function(){
	if ($(document).scrollTop() >= $(document).height() - $(window).height()-60) {
		count++;
		var quickList =JSON.parse(obj.kuaijieList);
		viewList(quickList);
		
	}
	
}); */
function alertError(errorMsg){
	mui.alert(errorMsg);
}


$(function(){
	var quickList =JSON.parse(obj.kuaijieList);
	viewList(quickList);
})	

function viewList(quickList){
	quickStr ="";
	if(quickList.length>0){
		for (var i=0;i<quickList.length;i++){
			/* if(i==quickList.length){
				$(".quickContBox").append(quickStr);
				 mui.toast('没有更多数据了',{ duration:'long'});
	    		 return;
	    	} */
			quickStr +="<li>";
			quickStr +="<div class='quickContBox_left'>";
			quickStr +="<div class='quickContBox_left_top'>";
			quickStr +="<strong>"+quickList[i].short_cn_name+"</strong>";
			var CARD_NO = quickList[i].CARD_NO;
			quickStr +="<span>尾号:"+CARD_NO.substr(CARD_NO.length-4)+"</span>";
			quickStr +="</div>";
			quickStr +="<div class='quickContBox_left_bottom'>";
			quickStr +=quickList[i].CREATE_TIME;
			quickStr +="</div>";
			quickStr +="</div>";
			quickStr +="<div class='quickContBox_right'>";
			if(quickList[i].STATUS=="10B"){
				quickStr +="<strong class='quickContBox_right_successful' style='color: green;'>"+quickList[i].TRX_AMT+"元</strong>";
				quickStr +="<em style='color: green;'>"+getOrderStatus(quickList[i].STATUS)+"</em>";
			}else if(quickList[i].STATUS=="70A") {
				quickStr +="<strong class='quickContBox_right_successful'>"+quickList[i].TRX_AMT+"元</strong>";
				quickStr +='<em>'+getOrderStatus(quickList[i].STATUS)+'<img class="smartContBox_bottom_right_tishi" src="/ksdH5/img/makePlan_wenhao.png"  onclick="alertError(\''+quickList[i].error+'\')" /></em>';
			}else {
				quickStr +="<strong class='quickContBox_right_successful'>"+quickList[i].TRX_AMT+"元</strong>";
				quickStr +="<em>"+getOrderStatus(quickList[i].STATUS)+"</em>";
			}
			quickStr +="</div>";
			quickStr +="</li>";
	    }
		$(".quickContBox").append(quickStr);
	}else {
		$(".quickContBox").hide();
		$(".smartContBox_noData").show();
	}

}

/* //时间戳转时间日期
function timestampToTime(timestamp) {
		if(timestamp==null){
			return null;
		}
       var date = new Date(timestamp);//时间戳为10位需*1000，时间戳为13位的话不需乘1000
       var Y = date.getFullYear() + '-';
       var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
       var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate()) + ' ';
       var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours()) + ':';
       var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes()) + ':';
       var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
       return new Date((Y+M+D+h+m+s).replace(/\-/g, '/')).getTime();
   } */
function getOrderStatus(status){
	if(status=="10A"){
		return "初始化";
	}else if (status=="10B"){
		return "交易成功";
	}else if (status=="10J"){
		return "待支付";
	}else if (status=="70A"){
		return "交易失败";
	}
	
}
</script>
</html>
